﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="frmListarProveedor.aspx.cs" Inherits="Intelsi.WB.frmListarProveedor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="post">
			<h2 class="title">Lista de Proveedores </h2>
</div>
<asp:UpdatePanel ID ="Uppeltrab" runat="server">
    <ContentTemplate>
        <fieldset>
            <asp:Button ID="btnNuevo" runat="server" Text="Nuevo Proveedor" 
                onclick="btnNuevo_Click" />
            <br />
            <br />
            <b>Empresa: </b><asp:TextBox ID="txtBuscar" runat="server" Width="313px"></asp:TextBox>&nbsp;<asp:Button
                ID="btnBuscar" runat="server" Text="Buscar" />
        </fieldset>
        <fieldset>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                onobjectcreating="ObjectDataSource1_ObjectCreating" 
                SelectMethod="GetAllFromProveedorByCriterio" 
                TypeName="Intelsi.BusinessLogic.ProveedorBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtBuscar" Name="criterio" PropertyName="Text" 
                        Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" 
                GridLines="None" AllowPaging="True">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Ruc" HeaderText="Ruc" SortExpression="Ruc" />
                    <asp:BoundField DataField="RazonSocial" HeaderText="RazonSocial" 
                        SortExpression="RazonSocial" />
                    <asp:BoundField DataField="NombreContacto" HeaderText="Contacto" 
                        SortExpression="NombreContacto" />
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                    <asp:BoundField DataField="TelefonoEmpr" HeaderText="Telefono Empresa" 
                        SortExpression="TelefonoEmpr" />
                    <asp:TemplateField HeaderText="Acciones">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" 
                                PostBackUrl='<%# Eval("IdProvedor","FrmProveedor.aspx?acc=editar&IdProveedor={0}") %>'>Editar</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
        </fieldset>
    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
